Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transport improvements from 2024-W49 #259

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft

Transport improvements from 2024-W49 #259

wants to merge 38 commits into from

Conversation

khaeru
Copy link
Member

@khaeru khaeru commented Dec 3, 2024

  • Items for SSP 2024/ScenarioMIP.
    • Update base scenario URLs from e.g. ixmp://ixmp-dev/SSP_dev_SSP1_v0.1_Blv0.18/baseline_prep_lu_bkp_solved_materials to e.g. ixmp://ixmp-dev/SSP_SSP1_v1.1/baseline_DEFAULT_step_13.
    • Constrain t=conm_ar (a P AIR technology) to a low/zero share in 2020. This technology was (a) taking a large share in y=2020 without constraints and (b) because not present at all in IEA EWEB for some regions, was being scaled with 1.0, so passing through as a large value.
    • Use a smaller growth_activity_up value for (t=ICAm_ptrp, n=R12_RCPA). The technology constraint as of 2020 is effective, but this tech/region grows too rapidly to 2025 and beyond. (per discussion with @r-aneeque 2024-12-04.)
    • Adjust efficiencies of LDV PHEV technologies using duty cycle data.
  • Items for aviation emissions postprocessing:

This branch is currently triggering the message_data transport runs using iiasa/message_data#582, which limits to a subset of all scenarios.

How to review

TBA

PR checklist

  • Continuous integration checks all ✅
  • Add or expand tests; coverage checks both ✅
  • Add, expand, or update documentation.
  • Update doc/whatsnew.

@khaeru khaeru added transport MESSAGEix-Transport variant or transport in the base model p:SSP-2024 2024 SSP updates and ScenarioMIP labels Dec 3, 2024
@khaeru khaeru self-assigned this Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 53.20334% with 168 lines in your changes missing coverage. Please review.

Project coverage is 65.0%. Comparing base (d55fbf9) to head (2a9f63c).

Files with missing lines Patch % Lines
message_ix_models/testing/check.py 35.7% 122 Missing ⚠️
message_ix_models/model/transport/freight.py 0.0% 16 Missing ⚠️
message_ix_models/model/transport/non_ldv.py 18.1% 9 Missing ⚠️
...sage_ix_models/tests/model/transport/test_build.py 60.0% 8 Missing ⚠️
message_ix_models/util/genno.py 36.3% 7 Missing ⚠️
message_ix_models/tools/iea/web.py 94.2% 2 Missing ⚠️
message_ix_models/model/transport/build.py 50.0% 1 Missing ⚠️
message_ix_models/model/transport/config.py 96.7% 1 Missing ⚠️
message_ix_models/model/transport/ldv.py 0.0% 1 Missing ⚠️
message_ix_models/util/sdmx.py 95.8% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (d55fbf9) and HEAD (2a9f63c). Click for more details.

HEAD has 10 uploads less than BASE
Flag BASE (d55fbf9) HEAD (2a9f63c)
22 12
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #259      +/-   ##
========================================
- Coverage   77.6%   65.0%   -12.6%     
========================================
  Files        211     213       +2     
  Lines      16079   16335     +256     
========================================
- Hits       12481   10623    -1858     
- Misses      3598    5712    +2114     
Files with missing lines Coverage Δ
message_ix_models/model/transport/demand.py 40.8% <ø> (-57.8%) ⬇️
message_ix_models/model/transport/files.py 88.0% <ø> (-10.6%) ⬇️
message_ix_models/model/transport/structure.py 91.2% <100.0%> (+0.8%) ⬆️
message_ix_models/model/transport/testing.py 75.0% <ø> (-25.0%) ⬇️
message_ix_models/model/transport/workflow.py 79.6% <100.0%> (-1.9%) ⬇️
message_ix_models/testing/__init__.py 76.3% <100.0%> (-17.4%) ⬇️
...age_ix_models/tests/model/transport/test_demand.py 58.4% <ø> (-32.5%) ⬇️
...age_ix_models/tests/model/transport/test_report.py 67.6% <ø> (-24.0%) ⬇️
message_ix_models/tests/tools/iea/test_web.py 100.0% <100.0%> (ø)
message_ix_models/model/transport/build.py 17.4% <50.0%> (-78.0%) ⬇️
... and 9 more

... and 37 files with indirect coverage changes

@khaeru khaeru force-pushed the transport/2024-W49 branch 6 times, most recently from e0e1fb6 to 8967c53 Compare December 5, 2024 13:40
- Only write the file if it is different from a refreshed codelist.
- Use ScenarioCodeAnnotations class.
- Add Config.use_scenario_code()
- Update base scenario URLs.
Replace with annotations in CL_TRANSPORT_SCENARIO.
This commodity is not used in IEA EWEB 2024 data for 2019, so we
constrain its activity to a low, non-zero level.
Mirror calculation flow in .ldv for same parameter.
"output" for most technologies is dimensionless because ACT and the
output commodities have the same units.
- Use .testing.check features to simplify list of assertions/debug output.
- Add the same set of cases as .test_demand.test_exo.
Include all assertions in .test_build.CHECKS
khaeru and others added 14 commits December 17, 2024 11:03
…instead of "input" parameter values.
Use (regions=R12, years=B) to match 'main' model version.
Resolve infeasibilities with updated base model.
purely based on very high 2025 demand numbers that are unrealistic
purely based on very high 2025 demand numbers that are unrealistic. Aviation adjustment based on scale-1
based on scale-1 and high 2025 values
based on scale 1 and 2025 values (AIR is too high and demand is too high as well)
Remove values for:
  - R12_AFR, ROAD, ethanol
  - R12_FSU, ROAD, electr
  - R12_LAM, ROAD, gas
  - R12_MEA, RAIL, lightoil
  - R12_PAO, ROAD, gas
  - R12_RCPA, RAIL, lightoil
  - R12_RCPA, ROAD, gas
- Add values for:
  - R12_AFR, RAIL, lightoil
  - R12_CHN, ROAD, electr
  - R12_NAM, RAIL, lightoil
  - R12_PAO, ROAD, ethanol
  - R12_RCPA, ROAD, ethanol
  - R12_SAS, ROAD, ethanol
- Adjust all others
@khaeru khaeru force-pushed the transport/2024-W49 branch from 3c9192d to b1f411e Compare December 17, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p:SSP-2024 2024 SSP updates and ScenarioMIP transport MESSAGEix-Transport variant or transport in the base model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants